using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using DATA.BusinessObjects;
using DATA.Base;

namespace DATA.ManagerObjects
{
    public partial interface IPhieuthuephongManager : IManagerBase<DATA.BusinessObjects.Phieuthuephong, string>
    {
		// Get Methods
		IList<Phieuthuephong> GetByMaPhong(System.String phong);
    }

    partial class PhieuthuephongManager : ManagerBase<DATA.BusinessObjects.Phieuthuephong, string>, IPhieuthuephongManager
    {
		#region Constructors
		
		public PhieuthuephongManager() : base()
        {
        }
        public PhieuthuephongManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<Phieuthuephong> GetByMaPhong(System.String phong)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Phieuthuephong));
			
			
			ICriteria phongCriteria = criteria.CreateCriteria("Phong");
            phongCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", phong));
			
			return criteria.List<Phieuthuephong>();
        }
		
		#endregion
    }
}